package se.liu.oschi129.level.levelspace;

import java.util.Hashtable;

/**
 * This is a class contains all levels in the game.
 * Use LevelSpace.add() to add a level into the level space and LevelSpace.get()
 * to return it from the collection. 
 * 
 * @author oschi129
 */
public abstract class LevelSpace {

	// A hashtable containing all levels in this collection
	private static Hashtable<String, LevelInterface> levelSpace = new Hashtable<String, LevelInterface> ();
	
	/** Adds a level into the level space */
	public static void add(String key, LevelInterface level) {
		levelSpace.put(key, level);
	}
	
	/** Returns a level from the level space */
	public static LevelInterface get(String key) {
		return levelSpace.get(key);
	}
	
}
